home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 31
/
PC Gamer IT CD 31 1-2.iso
/
EARTHL
/
MSIE3
/
IEAKJAVA.EXE
/
RCDATA
/
CABINET
/
JAVADBG.TXT
< prev
next >
Wrap
Text File
|
1997-01-31
|
5KB
|
117 lines
ActiveX debugger support for the Microsoft Virtual Machine for Java
===================================================================
ActiveX Debugging Mode
----------------------
This ActiveX debugger implementation runs in a special mode of the Microsoft
Virtual Machine for Java that must be enabled at startup. You can enable that
mode by running "SetDebug.exe", as described in the next section. ActiveX
debugging enables the ActiveX debugger under both Internet Explorer and JView.
The ActiveX debugging mode of the VM is enabled by the existence of a registry
key: "HKEY_LOCAL_MACHINE\Software\Microsoft\Java VM\ActiveXDebug".
This mode of the VM has two side effects that reduce the VM's performance:
1) The just-in-time Java compiler is disabled.
2) A debugger-instrumented bytecode interpreter loop is used.
To improve normal performance, you may wish to only enable the VM's ActiveX
debugging mode while debugging Java classes.
SetDebug.exe
------------
A utility app called SetDebug.exe is provided to enable / disable the ActiveX
debugging mode of the VM, and to add / remove path elements from the source
path. SetDebug is installed in the Windows directory.
Invoking "SetDebug", without any arguments, displays a dialog box that allows
you the enable / disable the ActiveX debugging mode of the VM. It creates or
deletes the ActiveXDebug registry key.
"SetDebug -?" displays a description of SetDebug's command line options:
Usage:
-d Disable ActiveX debugging for Java.
-e Enable ActiveX debugging for Java.
-p <path> Append <path> to the Java source path.
-r <path> Remove <path> from the Java source path.
E.g., "SetDebug -p c:\Sources" appends the "c:\Sources" path to the source
path. "SetDebug -r c:\Sources" removes it.
Java Source Code
----------------
Source code for most of the Java system classes is included in this release.
The VM can read the Java source code from the classes.zip file just like it
reads the Java classes from that file. There is no need to unzip the
classes.zip file, unless you wish to view the system classes' source code
outside the debugger.
The VM searches for the source code for Java classes similar to the way that it
searches for class files. The VM first searches the source path, followed by
the class path, for a source file. Source code for a class must be located in
the same package location as the class. This does not necessarily mean the
same container. E.g., if you have your class path set to include the
"c:\Classes" directory, and your source path set to include the "c:\Sources"
directory, the VM could find the foo.Bar class as "c:\Classes\foo\Bar.class",
and Bar's source code in "c:\Sources\foo\Bar.java".
The VM reads the source path from the "SourcePath" string value of the
"HKEY_LOCAL_MACHINE\Software\Microsoft\Java VM" registry key. The VM reads the
class path from the "ClassPath" string value of the same key. The source path
value can be manipulated using SetDebug, as described in the previous section.
Debugger
--------
The debugger comes up with the Java class tree view fully expanded. You can
expand or collapse package views by clicking on the plus / minus sign to the
left of a package name.
The debugger can still break and step in methods for which it does not have
source code, e.g., when you invoke Internet Explorer->Edit->Break at Next
Statement. No source code or bytecode disassembly is displayed. If you can't
tell where you are, look at the Call Stack window.
In can be difficult to tell whether the debuggee is in a running state or in a
break state from the debugger. The Call Stack window will display "<Running>"
while the debuggee is executing, and a call stack when the debuggee is stopped
in the debugger. Also, the toolbar execution buttons are disabled while the
debuggee is executing, and enabled when the debuggee is stopped in the
debugger.
Immediate Window
----------------
The "JAutoExp.dat" file installed in the Windows directory allows you to
customize the way Java classes are displayed in the Immediate window. See that
file for details.
You cannot evaluate expressions that include Java methods in the Immediate
window.
Thread List Window
------------------
The Thread List window in the debugger may get out of sync with the threads
executing in the Java VM.
The issues listed above will be addressed in future releases of the Microsoft
Virtual Machine for Java and the Microsoft ActiveX Debugger.